home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
code.cst
/
00001_Script_cmr-roll
next >
Wrap
Text File
|
2002-10-15
|
2KB
|
97 lines
property plain,rolled,clicked,state,flashstate,flashon,nextflash,blinkrate,mysprite,spritenum,ftime
global ans,lastclicked,nome,godject
on new me
mysprite=sprite(spritenum)
plain=mysprite.member.name
state=0
flashstate=0
flashon=0
nextflash=0
blinkrate=30
ftime=0
end
on beginsprite me
if rolled="x" then rolled=plain&"hot"
if clicked="x" then clicked=plain
end
on getpropertydescriptionlist me
set proplist=[#rolled:[#comment:"Name of rollover image",#format:#string,#default:"x"],#clicked:[#comment:"Name of clicked image",#format:#string,#default:"x"]]
return proplist
end
on mouseenter me
if state<>1 then
state=1
mysprite.member=member rolled
updatestage
end if
pass
end
on mousedown me
if not(soundbusy(1)) and not(soundbusy(2)) then
lastclicked=clicked
end if
state=3
mysprite.member=member(clicked)
updatestage
pass
end
on mouseleave me
if state then
state=0
mysprite.member=member(plain)
updatestage
end if
pass
end
on flash me
if flashstate=0 then
mysprite.member=member(rolled)
else
mysprite.member=member(plain)
end if
flashstate=not(flashstate)
end
on blink_on me,br,ft
if br.ilk=#integer then blinkrate=br
nextflash=the ticks+blinkrate
flashon=1
if ft.ilk=#integer then
ftime=the ticks+ft
else
ftime=0
end if
end
on blink_off me
mysprite.member=member(plain)
updatestage
flashon=0
end
on exitframe me
if flashon then
if the ticks>nextflash then
flash(me)
nextflash=the ticks+blinkrate
end if
if the ticks>ftime and ftime<>0 then
ftime=0
blink_off(me)
end if
end if
end